home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update23.zoo / curses / diffs next >
Encoding:
Text File  |  1992-07-21  |  6.1 KB  |  262 lines

  1. *** 1.12    1992/06/03 15:39:50
  2. --- Changelo    1992/07/21 15:03:30
  3. ***************
  4. *** 154,156 ****
  5. --- 154,169 ----
  6.       in flush_key_buff()
  7.   
  8.   -------------------------- Patchlevel  13 ---------------------------------
  9. + clrtobot.c, erase.c, initscr.c, mincl, termcap.h, tputs.c, tstp.c:: ers
  10. +     cleanup, casts etc
  11. + xconsole.c:: ers
  12. +     approximation for console_set_key functionality for MiNT using
  13. +     ioctl(..., XKEY) (MiNT 0.94 or better required for this).
  14. + name chances
  15. +     mv id_subwin.c id_subwi.c
  16. +     mv overwrite.c overwrit.c
  17. +     mv toucholap.c touchola.c
  18. + -------------------------- Patchlevel  14 ---------------------------------
  19. *** 1.11    1992/06/03 15:39:50
  20. --- PatchLev.h    1992/07/21 15:03:31
  21. ***************
  22. *** 1,5 ****
  23.   /*
  24. !  *    PathLevel: 13
  25.    *
  26.    *    the Patch Level above is to identify the version
  27.    *    of the all the files in this directory. given the above
  28. --- 1,5 ----
  29.   /*
  30. !  *    PathLevel: 14
  31.    *
  32.    *    the Patch Level above is to identify the version
  33.    *    of the all the files in this directory. given the above
  34. *** 1.2    1989/08/07 00:19:47
  35. --- clrtobot.c    1992/07/21 15:03:32
  36. ***************
  37. *** 44,50 ****
  38.                   *sp = ' ';
  39.               }
  40.           if (minx != _NOCHANGE)
  41. !             touchline(win, y, minx, maxx - &win->_y[y][0]);
  42.           startx = 0;
  43.       }
  44.   }
  45. --- 44,50 ----
  46.                   *sp = ' ';
  47.               }
  48.           if (minx != _NOCHANGE)
  49. !             touchline(win, y, minx, (int)(maxx - &win->_y[y][0]));
  50.           startx = 0;
  51.       }
  52.   }
  53. *** 1.2    1989/08/07 00:20:00
  54. --- erase.c    1992/07/21 15:03:34
  55. ***************
  56. *** 47,53 ****
  57.                   *sp = ' ';
  58.               }
  59.           if (minx != _NOCHANGE)
  60. !             touchline(win, y, minx, maxx - win->_y[y]);
  61.       }
  62.       win->_curx = win->_cury = 0;
  63.   }
  64. --- 47,53 ----
  65.                   *sp = ' ';
  66.               }
  67.           if (minx != _NOCHANGE)
  68. !             touchline(win, y, minx, (int)(maxx - win->_y[y]));
  69.       }
  70.       win->_curx = win->_cury = 0;
  71.   }
  72. *** 1.4    1991/05/04 18:38:14
  73. --- initscr.c    1992/07/21 15:03:37
  74. ***************
  75. *** 56,62 ****
  76.       _puts(TI);
  77.       _puts(VS);
  78.   # if defined(SIGTSTP) && defined(__MINT__)
  79. !     signal(SIGTSTP, tstp);
  80.   # endif
  81.       if (curscr != NULL) {
  82.   # ifdef DEBUG
  83. --- 56,62 ----
  84.       _puts(TI);
  85.       _puts(VS);
  86.   # if defined(SIGTSTP) && defined(__MINT__)
  87. !     signal(SIGTSTP, (__Sigfunc) tstp);
  88.   # endif
  89.       if (curscr != NULL) {
  90.   # ifdef DEBUG
  91. *** 1.2    1991/05/04 18:38:14
  92. --- mincl    1992/07/21 15:03:38
  93. ***************
  94. *** 1,9 ****
  95.   CURSEOBJ = addbytes.o addch.o addstr.o box.o clear.o clrtobot.o clrtoeol.o \
  96.       cr_put.o cr_tty.o curses.o delch.o deleteln.o delwin.o endwin.o \
  97. !     erase.o fullname.o getch.o getstr.o id_subwin.o idlok.o \
  98.       initscr.o insch.o insertln.o longname.o move.o mvprintw.o \
  99. !     mvscanw.o mvwin.o newwin.o overlay.o overwrite.o printw.o \
  100. !     putchar.o refresh.o scanw.o scroll.o standout.o toucholap.o \
  101.       touchwin.o tstp.o unctrl.o
  102.   
  103.   TERMOBJ =    tgetent.o tgetflag.o tgetnum.o tgetstr.o tgoto.o \
  104. --- 1,9 ----
  105.   CURSEOBJ = addbytes.o addch.o addstr.o box.o clear.o clrtobot.o clrtoeol.o \
  106.       cr_put.o cr_tty.o curses.o delch.o deleteln.o delwin.o endwin.o \
  107. !     erase.o fullname.o getch.o getstr.o id_subwi.o idlok.o \
  108.       initscr.o insch.o insertln.o longname.o move.o mvprintw.o \
  109. !     mvscanw.o mvwin.o newwin.o overlay.o overwrit.o printw.o \
  110. !     putchar.o refresh.o scanw.o scroll.o standout.o touchola.o \
  111.       touchwin.o tstp.o unctrl.o
  112.   
  113.   TERMOBJ =    tgetent.o tgetflag.o tgetnum.o tgetstr.o tgoto.o \
  114. *** 1.3    1992/06/03 15:39:50
  115. --- termcap.h    1992/07/21 15:03:40
  116. ***************
  117. *** 28,34 ****
  118.   __EXTERN void tputs __PROTO((char *cp, int affcnt, int (*outc)(int )));
  119.   
  120.   #ifdef __cplusplus
  121. ! extern "C" {
  122.   #endif
  123.   
  124.   #endif /* _TERMCAP_H */
  125. --- 28,34 ----
  126.   __EXTERN void tputs __PROTO((char *cp, int affcnt, int (*outc)(int )));
  127.   
  128.   #ifdef __cplusplus
  129. ! }
  130.   #endif
  131.   
  132.   #endif /* _TERMCAP_H */
  133. *** 1.3    1991/05/04 18:38:14
  134. --- tputs.c    1992/07/21 15:03:41
  135. ***************
  136. *** 146,152 ****
  137.           ptime *= 10;
  138.           ptime += (*cp - '0');
  139.       }
  140. !     ptime *= 10;
  141.       if (*cp == '.') {
  142.           cp++;
  143.           if (isdigit(*cp)) {
  144. --- 146,153 ----
  145.           ptime *= 10;
  146.           ptime += (*cp - '0');
  147.       }
  148. !     if (ptime)
  149. !         ptime *= 10;
  150.       if (*cp == '.') {
  151.           cp++;
  152.           if (isdigit(*cp)) {
  153. *** 1.5    1991/05/04 18:38:14
  154. --- tstp.c    1992/07/21 15:03:41
  155. ***************
  156. *** 54,60 ****
  157.       omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
  158.       kill(0, SIGTSTP);
  159.       sigblock(mask(SIGTSTP));
  160. !     signal(SIGTSTP, tstp);
  161.       _tty = tty;
  162.       stty(_tty_ch, &_tty);
  163.       wrefresh(curscr);
  164. --- 54,60 ----
  165.       omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
  166.       kill(0, SIGTSTP);
  167.       sigblock(mask(SIGTSTP));
  168. !     signal(SIGTSTP, (__Sigfunc)tstp);
  169.       _tty = tty;
  170.       stty(_tty_ch, &_tty);
  171.       wrefresh(curscr);
  172. *** 1.9    1992/06/03 15:39:50
  173. --- xconsole.c    1992/07/21 15:03:42
  174. ***************
  175. *** 11,16 ****
  176. --- 11,18 ----
  177.    */
  178.   
  179.   #include <osbind.h>
  180. + #ifndef __MINT__
  181.   #include <support.h>
  182.   #include <stdlib.h>
  183.   #include <ioctl.h>
  184. ***************
  185. *** 276,278 ****
  186. --- 278,348 ----
  187.       }
  188.       }
  189.   }
  190. + #else  /* __MINT__ */
  191. + /* a rough approximation for console_set_key using MiNT's
  192. +  * XKEY ioctl
  193. +  */
  194. + #include <ioctl.h>
  195. + #include <keycodes.h>
  196. + #include <string.h>
  197. + static struct DEFS {
  198. +     int kcode, reg, shift;
  199. + } codes[] = {
  200. + { CURS_UP, 20, 28 },
  201. + { CURS_DN, 21, 29 },
  202. + { CURS_RT, 22, 30 },
  203. + { CURS_LF, 23, 31 },
  204. + { K_HELP, 24, 0 },
  205. + { K_UNDO, 25, 0 },
  206. + { K_INS, 26, 0 },
  207. + { K_HOME, 27, 0 },
  208. + { 0, 0, 0 }
  209. + };
  210. + void
  211. + console_set_key(keycode, regular, shifted, alted)
  212. + int keycode;
  213. + char *regular, *shifted, *alted;
  214. + {
  215. +     struct Xkey {
  216. +         short xk_num;
  217. +         char xk_def[8];
  218. +     } xk;
  219. +     int i;
  220. +     xk.xk_def[7] = 0;
  221. +     if (keycode >= F_1 && keycode <= F_10) {
  222. +         if (regular) {
  223. +             xk.xk_num = keycode - F_1;
  224. +             strncpy(xk.xk_def, regular, 7);
  225. +             ioctl(0, TIOCSXKEY, &xk);
  226. +         }
  227. +         if (shifted) {
  228. +             xk.xk_num = keycode - F_1 + 10;
  229. +             strncpy(xk.xk_def, regular, 7);
  230. +             ioctl(0, TIOCSXKEY, &xk);
  231. +         }
  232. +         return;
  233. +     }
  234. +     for (i = 0; codes[i].kcode; i++) {
  235. +         if(keycode == codes[i].kcode) {
  236. +             if (regular) {
  237. +                 xk.xk_num = codes[i].reg;
  238. +                 strncpy(xk.xk_def, regular, 7);
  239. +                 ioctl(0, TIOCSXKEY, &xk);
  240. +             }
  241. +             if (shifted && codes[i].shift) {
  242. +                 xk.xk_num = codes[i].shift;
  243. +                 strncpy(xk.xk_def, shifted, 7);
  244. +                 ioctl(0, TIOCSXKEY, &xk);
  245. +             }
  246. +             return;
  247. +         }
  248. +     }
  249. + }
  250. + #endif /* __MINT__ */
  251.